[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CALCINIT()
 To set the calculator colors or a set of colors to recognize and replace.
------------------------------------------------------------------------------

 Syntax

      CALCINIT( [<caColors>] )  -> NIL

 Arguments

      <caColors> may be a character color value, an array of colors,
      or other data type.

      Defaults to NIL (automatically setting the colors to "W+/B" on a
       color adapter)

 Returns

      CALCINIT() always returns NIL

 Description

      You may use CALCINIT() to set the calculator colors or to search
      and replace set of colors, or to default to current colors.

      Regarding the parameter <caColors>:

      . If it is a character color value, it must be in the standard color
        format (i.e. "W+/R") (SEE EXAMPLE 1)

      . If it is an array, it must be two dimensional, the first to search
        and match the current colorset (it must contain one comma);
        the second to set the color upon finding a match (SEE EXAMPLE 2)

      . If it is NIL (the default), it will set the calculator colors to "N/W"
        (SEE EXAMPLE 3)

      . If it is any other data type (such as logical), it will keep the
        colors that it was called with (SEE EXAMPLE 4)

 Examples

     ** Example 1 - character parameter

        CALCINIT( "W+/R" )  // calculator will now operate as white on blue
        Calculator()


     ** Example 2 - array

        aColors :=  {   {"W+/N," , "N/W" } ,;   //color must include comma
                        {"R+/B," , "B+/R"} ,;
                        {""      , "W/N" }   }  //all non-matched colors
                                                // will match with ""

        CalcInit( aColors )

        The above example will (upon calling the calculator), check the
        current color against "W+/N," and, if found, set the color to "N/W".
        If not, will compare against "R+/B," and, if found set the color to
        "B+/R".  If neither is found, the "" will be matched and the color
        set to "W/N".


     ** Example 3 - NIL  (default)

        CalcInit(NIL)       // or never issuing a CalcInit()

        SetColor("W/R")
        Calculator()        // this will operate the calculator in the default
                            //  color of W+/B


     ** Example 4 - other, (logical)

        CalcInit(.T.)

        SetColor("W/R")
        Calculator()        // this will operate the calculator in W/R



 Files: CALC.LIB

 Author: Touchstone Business Creations          CompuServe ID: 73670,2561
         28613 River Glen Ct. #1
         Menifee, CA 92584-8987 USA

         (909) 679-3364

 Owner : (c) Copyright, 1991,92,93 Touchstone Business Creations

See Also: CALCPOS() CALCUDF() CALCULATOR() CALCREG()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson